package com.feihao.zhou.dao;

import com.feihao.zhou.bean.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentMapperInterface {
    //接口的返回值类型、接口的方法名、接口的参数类型必须和映射文件的resultType、id名称、parameter类型一致！！
    //接口的名称必须与映射文件的namespace名称（即接口的全限定名称）一致

    abstract List<Student> selectAll();

    abstract Student selectById(Integer id);

    abstract List<Student> selectByNameOrAge(@Param("p1") String name, @Param("p2") Integer i);

    abstract Integer insert(Student stu);

    abstract Integer update(Student student);

    List<Student> selectCondition(Student student);

}
